[sql server 2005]how to list all table name in T-SQL
Posted
by shrimpy
on Stack Overflow
See other posts from Stack Overflow
or by shrimpy
Published on 2010-03-16T17:52:29Z
Indexed on
2010/03/16
18:01 UTC
Read the original article
Hit count: 388
sql-server-ce
|sql-server
SELECT name FROM sys.databases -- this can list all database name in the server
user database
SELECT * FROM INFORMATION_SCHEMA.TABLES -- these two line can list the table for one particular database
but how to do something in order can have the result like the following
Database Table
--------- -------------
db1 t1
db1 t2
db2 t1
... ...
-thx
© Stack Overflow or respective owner